package com.example.LibrarySystem.response;

/**
 * 统一返回类
 */


import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class Result implements Serializable {
    /**
     * 数据
     */
    private Map<String,Object> data = new HashMap<>();

    /**
     * 消息
     */
    private String msg;

    /**
     * 状态码
     */
    private Integer status;

    public Result() {
    }

    public Result(String msg, Integer status) {
        this.msg = msg;
        this.status = status;
    }

    public void put(String key, Object value){
        data.put(key,value);
    }

    public Map<String, Object> getData() {
        return data;
    }

    public void setData(Map<String, Object> data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
